#ifndef UI_FONTBOX_H
#define UI_FONTBOX_H

#include <qcombobox.h>

#include "lx_define.h"
#include "pf_font.h"
#include "pf_fontlist.h"
#include "gui_export.h"

/**
 * A combobox for choosing a font name.
 */
class GUI_EXPORT UI_FontBox: public QComboBox {
    Q_OBJECT

public:
    UI_FontBox(QWidget* parent=0, const char* name=0);
    virtual ~UI_FontBox();

    PF_Font* getFont() {
        return currentFont;
    }
    void setFont(const QString& fName);

    void init();

private slots:
    void slotFontChanged(int index);

signals:
    void fontChanged(PF_Font* font);

private:
    PF_Font* currentFont;
};

#endif

